import React,{ Component } from 'react';
import { Select, Radio } from 'antd';
const Option = Select.Option;

class FormSelect extends Component {
	constructor(props) {
		super(props);
		this.state = {
			arr: ['玫瑰花','11','a123','橘色']
		}
	}
	handleChange = (value)=>{
		console.log('value的值是：',value);
	}
	handleClick(value) {
		console.log('value是：',value);
	}
	render() {
		const { size } = this.state;
		return (
			<div style={{ width: '50%',height: '30px',lineHeight: '30px',border: '1px solid #ccc',borderRadius: '5px'}}>
				<Select
			        mode="tags"
			        size={size}
			        placeholder="请点击选择"
			        defaultValue={['a10', 'c12']}
			        onChange={ this.handleChange }
			        style={{ width: '100%',border: 0,outline: 0}}
			        dropdownStyle = { {height: '300px'} }
		        >
	          		{
	          			this.state.arr.map((item,index)=>{
		          			return (
		          				<Option key={index} onClick={ this.handleClick.bind(this)}>
		          					{ item }
		          				</Option>
		          			)
		          		})
	          		}
		        </Select>
			</div>
		)
	}
}
export default FormSelect;